from apps.a_common.constants import ProjectStatus
from apps.a_common.db import TimeMarkModel
from apps.foundation import db
from utils.time import int_timestamp


class Project(TimeMarkModel):
    name = db.Column(db.VARCHAR(126))
    backend = db.Column(db.TEXT)
    start_at = db.Column(db.Integer, default=int_timestamp)
    end_at = db.Column(db.Integer, nullable=True)
    status = db.Column(db.SMALLINT, default=ProjectStatus.SURVEY)
    need_skills = db.Column(db.ARRAY(db.SMALLINT))
